import { default as db } from '$lib/server/database';

/** @type {import('./$types').PageServerLoad} */
export async function load({ params, url }: { params: any; url: URL }) {
	let module = url.searchParams.get('module');
	console.log('params', params, module);
	if (!module) {
		module = '最新';
	}
	return {
		posts:  db.list(module),
		module
	};
}
